package com.example.demo.component;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class HelloReceive3 {

	@RabbitListener(queues = "fanout.A") // 监听器监听指定的Queue
	public void process1(String str) {
		System.out.println("Amessage:" + str);
	}

	@RabbitListener(queues = "fanout.B") // 监听器监听指定的Queue
	public void process2(String str) {
		System.out.println("Bmessage:" + str);
	}
	
	@RabbitListener(queues = "fanout.C") // 监听器监听指定的Queue
	public void process3(String str) {
		System.out.println("Cmessage:" + str);
	}

}